;Assembler header file for Scale
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:07:20 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 5 Sept 1995

        [       :LNOT: :DEF: Scale_Hdr
        GBLS    Scale_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Window
        GBLS    Get_Window
        ]
        [       :LNOT: :DEF: Window_Hdr
Get_Window                      SETS    "GET oslib/Window.Hdr"
        |
Get_Window                      SETS    ""
        ]
        $Get_Window

;Symbols for constants
Class_Scale                     *       &82C00
Scale_GenerateAboutToBeShown    *       &1
Scale_GenerateDialogueCompleted *       &2
Scale_IncludeScaleToFit         *       &4
Scale_Percent                   *       &82C000
Scale_StdValue0                 *       &82C001
Scale_StdValue1                 *       &82C002
Scale_StdValue2                 *       &82C003
Scale_StdValue3                 *       &82C004
Scale_Cancel                    *       &82C005
Scale_Scale                     *       &82C006
Scale_PercentLabel              *       &82C007
Scale_ScaleLabel                *       &82C008
Scale_ScaleToFit                *       &82C009
Action_ScaleAboutToBeShown      *       &82C00
Action_ScaleDialogueCompleted   *       &82C01
Action_ScaleApplyFactor         *       &82C02
Error_ScaleTasksActive          *       &80B700
Error_ScaleAllocFailed          *       &80B701
Error_ScaleShortBuffer          *       &80B702
Error_ScaleNoSuchTask           *       &80B711
Error_ScaleNoSuchMethod         *       &80B712
Error_ScaleNoSuchMiscOpMethod   *       &80B713
Scale_SetLowerBound             *       &1
Scale_SetUpperBound             *       &2
Scale_SetStepSize               *       &4

;Symbols for structure offsets and sizes
                                ^       0
                                #       Bits
Scale_Flags                     *       @

                                ^       0
Scale_Object_flags              #       Scale_Flags
Scale_Object_lower_bound        #       Int
Scale_Object_upper_bound        #       Int
Scale_Object_step_size          #       Int
Scale_Object_title              #       Toolbox_MsgReference
Scale_Object_title_limit        #       Int
Scale_Object_alternative_window_name #       Toolbox_StringReference
Scale_Object_std_value          #       4*Int
Scale_Object                    *       @

                                ^       0
Scale_ObjectTemplate            Toolbox_ResourceFileObject_MEMBERS
Scale_ObjectTemplate_objectflags #       Scale_Flags
Scale_ObjectTemplate_lower_bound #       Int
Scale_ObjectTemplate_upper_bound #       Int
Scale_ObjectTemplate_step_size  #       Int
Scale_ObjectTemplate_title      #       Toolbox_MsgReference
Scale_ObjectTemplate_title_limit #       Int
Scale_ObjectTemplate_alternative_window_name #       Toolbox_StringReference
Scale_ObjectTemplate_std_value  #       4*Int
Scale_ObjectTemplate            *       @

Scale_Full                      *       Toolbox_Full

                                ^       0
Scale_ActionAboutToBeShown_tag  #       Toolbox_PositionTag
Scale_ActionAboutToBeShown_position *       @
Scale_ActionAboutToBeShown_position_top_left #       OS_Coord
                                ^       Scale_ActionAboutToBeShown_position
Scale_ActionAboutToBeShown_position_full #       Scale_Full
Scale_ActionAboutToBeShown      *       @

                                ^       0
Scale_ActionApplyFactor_percent #       Int
Scale_ActionApplyFactor         *       @

                                ^       0
Scale_ActionAboutToBeShownBlock Toolbox_ActionHeader_MEMBERS
Scale_ActionAboutToBeShownBlock_tag #       Toolbox_PositionTag
Scale_ActionAboutToBeShownBlock_position *       @
Scale_ActionAboutToBeShownBlock_position_top_left #       OS_Coord
                                ^       Scale_ActionAboutToBeShownBlock_position
Scale_ActionAboutToBeShownBlock_position_full #       Scale_Full
Scale_ActionAboutToBeShownBlock *       @

Scale_ActionDialogueCompletedBlock *       Toolbox_ActionHeaderBase

                                ^       0
Scale_ActionApplyFactorBlock    Toolbox_ActionHeader_MEMBERS
Scale_ActionApplyFactorBlock_percent #       Int
Scale_ActionApplyFactorBlock    *       @


;Symbols for SWI's and SWI reason codes
XScale_ClassSWI                 *       &A2C00
Scale_ClassSWI                  *       &82C00

XScale_PostFilter               *       &A2C01
Scale_PostFilter                *       &82C01

XScale_PreFilter                *       &A2C02
Scale_PreFilter                 *       &82C02

Scale_GetWindowID               *       &0
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = scale (Toolbox_O)
   ;  R2 = &0
   ;Exit
   ;  R0 = window (Toolbox_O)

Scale_SetValue                  *       &1
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = scale (Toolbox_O)
   ;  R2 = &1
   ;  R3 = value (Int)

Scale_GetValue                  *       &2
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = scale (Toolbox_O)
   ;  R2 = &2
   ;Exit
   ;  R0 = value (Int)

Scale_SetBounds                 *       &3
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = scale (Toolbox_O)
   ;  R2 = &3
   ;  R3 = lower_bound (Int)
   ;  R4 = upper_bound (Int)
   ;  R5 = step_size (Int)

Scale_GetBounds                 *       &4
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = scale (Toolbox_O)
   ;  R2 = &4
   ;Exit
   ;  R0 = lower_bound (Int)
   ;  R1 = upper_bound (Int)
   ;  R2 = step_size (Int)

Scale_SetTitle                  *       &5
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = scale (Toolbox_O)
   ;  R2 = &5
   ;  R3 -> title (String)

Scale_GetTitle                  *       &6
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = scale (Toolbox_O)
   ;  R2 = &6
   ;  R3 = buffer (pointer to String)
   ;  R4 = size (Int)
   ;Exit
   ;  R3 = used (Int)

        ]
        END
